<html class="x-admin-sm">
<head>
    <meta charset="UTF-8">
    <style>
        .zh {
            background-color: #93D1FF;
        }

        th {
            background: #f0f0f0;
            text-align: center;
        }
    </style>
    <script type="text/javascript" th:src="@{/js/require.js}"></script>
    <script type="text/javascript" th:src="@{/js/requireConfig.js}"></script>
    <script type="text/javascript" th:src="@{/js/app/role/home.js}"></script>
</head>
<body>
<div class="layui-fluid" id="role" style="position:absolute;top:0px;bottom: 40px;width: 100%">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12">
            <div class="layui-card" id="seach">
                <div class="layui-card-body ">
                    <form class="layui-form layui-col-space5" action="">
                        <div class="layui-input-inline layui-show-xs-block" style="padding-top: 17px">
                            <input type="text" name="roleCode" style="padding: 0px 5px" placeholder="请输入角色编码"
                                   autocomplete="off"
                                   class="layui-input">
                        </div>
                        <div class="layui-input-inline layui-show-xs-block" style="padding-top: 17px">
                            <input type="text" name="roleName" style="padding: 0px 5px" placeholder="请输入角色名"
                                   autocomplete="off"
                                   class="layui-input">
                        </div>
                        <div class="layui-input-inline layui-show-xs-block">
                            <button class="layui-btn" lay-submit lay-filter="soso" type="submit">
                                <i class="layui-icon">&#xe615;</i></button>
                        </div>
                    </form>
                    <div class="layui-card-header" style="padding: 0 0">
                        <div class="layui-btn-group">
                            <button @click="show_add()" type="button" class="layui-btn layui-btn-normal layui-btn-sm">
                                <i class="layui-icon layui-icon-add-1"></i>增加
                            </button>
                            <button @click="show_update()" type="button"
                                    class="layui-btn layui-btn-normal layui-btn-sm">
                                <i class="layui-icon layui-icon-edit"></i>修改&nbsp;/&nbsp;授权
                            </button>
                        </div>
                        <div class="layui-btn-group">
                            <button @click="deleted()" type="button" class="layui-btn layui-btn-danger layui-btn-sm">
                                <i class="layui-icon layui-icon-delete"></i>删除
                            </button>
                            <button @click="show_xq()" type="button" class="layui-btn layui-btn-sm">
                                <i class="layui-icon layui-icon-list"></i>详情
                            </button>
                        </div>
                        <div class="layui-btn-group">
                            <button @click="referXadmin()" type="button"
                                    class="layui-btn layui-btn-normal layui-btn-sm">
                                <i class="layui-icon layui-icon-refresh-1"></i>刷新
                            </button>
                        </div>
                    </div>
                </div>
            </div>
            <div class="layui-card" id="list">
                <div class="layui-card-body ">
                    <form class="layui-form" action="">
                        <table class="layui-table" id="tab" lay-size="sm">
                            <thead>
                            <tr>
                                <th>序号</th>
                                <th>uuid</th>
                                <th>角色编码</th>
                                <th>角色名称</th>
                                <th>角色权限个数</th>
                                <th>角色维护日期</th>
                            </tr>
                            </thead>
                            <tbody>
                            <tr v-for="(ls,i) in list" onclick="sure(this)">
                                <td>{{i+1}}</td>
                                <td>{{ls.uuid}}</td>
                                <td>{{ls.roleCode}}</td>
                                <td>
                                    {{ls.roleName}}
                                </td>
                                <td>
                                    {{ls.roleNum}}
                                </td>
                                <td>
                                    {{ls.methodTime}}
                                </td>
                            </tr>
                            </tbody>
                        </table>
                        <div id="test1"></div>
                    </form>
                </div>
            </div>
            <div class="layui-card" style="display:none" id="add">
                <div class="layui-card-body ">
                    <button type="button" class="layui-btn layui-btn-normal" @click="pre_home()">
                        <i class="layui-icon layui-icon-return"></i>&nbsp;返回
                    </button>
                    <table class="layui-table" lay-size="sm" id="add_save">
                        <tr>
                            <th>角色编码</th>
                            <td name="roleCode">{{radomCode}}</td>
                            <th>角色名称</th>
                            <td name="roleName" id="roleName" @dblclick="editDBL($event)"></td>
                        </tr>
                        <tr>
                            <th>权限个数</th>
                            <td name="roleNum">0</td>
                            <th>维护日期</th>
                            <td name="createTime">{{day}}</td>
                        </tr>
                        <tr>
                            <th>介绍</th>
                            <td colspan="3" name="bz" id="bz" @dblclick="editDBLTEXT($event)"></td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <div class="layui-btn-group layui-input-inline layui-show-xs-block">
                                    <button @click="add_save()" type="button"
                                            class="layui-btn layui-btn-warm layui-btn-sm">
                                        <i class="layui-icon layui-icon-list"></i>保存
                                    </button>
                                    <button @click="add_reset()" type="button"
                                            class="layui-btn layui-btn-normal layui-btn-sm">
                                        <i class="layui-icon layui-icon-refresh-1"></i>重置
                                    </button>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="layui-card" style="display:none" id="update">
                <div class="layui-card-body">
                    <button type="button" class="layui-btn layui-btn-normal" @click="pre_home()">
                        <i class="layui-icon layui-icon-return"></i>&nbsp;返回
                    </button>
                    <table class="layui-table" lay-size="sm" id="up_save">
                        <tr>
                            <th>角色编码</th>
                            <td name="roleCode">{{th.roleCode}}</td>
                            <th>角色名称</th>
                            <td name="roleName" id="uproleName" @dblclick="editDBL($event)">{{th.roleName}}</td>
                        </tr>
                        <tr>
                            <th>权限个数</th>
                            <td name="roleNum">{{th.roleNum}}</td>
                            <th>维护日期</th>
                            <td name="createTime">{{th.createTime}}</td>
                        </tr>
                        <tr>
                            <th>介绍</th>
                            <td colspan="3" name="bz" id="upbz" @dblclick="editDBLTEXT($event)">{{th.bz}}</td>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <div class="layui-btn-group layui-input-inline layui-show-xs-block">
                                    <button @click="up_save()" type="button"
                                            class="layui-btn layui-btn-warm layui-btn-sm">
                                        <i class="layui-icon layui-icon-list"></i>保存
                                    </button>
                                    <button @click="up_reset()" type="button"
                                            class="layui-btn layui-btn-normal layui-btn-sm">
                                        <i class="layui-icon layui-icon-refresh-1"></i>重置
                                    </button>
                                </div>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="layui-card" style="display:none" id="sq">
                <div class="layui-card-body">
                    <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
                        <ul class="layui-tab-title">
                            <li class="layui-this">功能权限</li>
                            <li>页面操作权限</li>
                        </ul>
                    </div>
                    <div id="qx">

                    </div>
                    <div id="sj" style="display: none;">

                    </div>
                </div>
            </div>



            <div class="layui-card" style="display:none" id="xq">
                <div class="layui-card-body">
                    <button type="button" class="layui-btn layui-btn-normal" @click="pre_home()">
                        <i class="layui-icon layui-icon-return"></i>&nbsp;返回
                    </button>
                    <table class="layui-table" lay-size="sm">
                        <tr>
                            <th>角色编码</th>
                            <td name="roleCode">{{th.roleCode}}</td>
                            <th>角色名称</th>
                            <td name="roleName">{{th.roleName}}</td>
                        </tr>
                        <tr>
                            <th>权限个数</th>
                            <td name="roleNum">{{th.roleNum}}</td>
                            <th>维护日期</th>
                            <td name="createTime">{{th.createTime}}</td>
                        </tr>
                        <tr>
                            <th>介绍</th>
                            <td colspan="3" name="bz">{{th.bz}}</td>
                        </tr>
                    </table>
                </div>
            </div>
            <div class="layui-card" style="display:none" id="sq_xq">
                <div class="layui-card-body">
                    <table class="layui-table layui-form" lay-size="sm">
                        <thead>
                        <tr>
                            <th colspan="4" style="text-align: center">功能权限</th>
                        </tr>
                        <tr>
                            <td colspan="4">
                                <form class="layui-form layui-col-space5" action="">
                                    <div class="layui-input-inline layui-show-xs-block" style="padding-top: 17px">
                                        <input type="text" name="uuid" style="padding: 0px 5px" placeholder="请输入功能ID"
                                               autocomplete="off"
                                               class="layui-input">
                                    </div>
                                    <div class="layui-input-inline layui-show-xs-block" style="padding-top: 17px">
                                        <input type="text" name="navig" style="padding: 0px 5px" placeholder="请输入功能名称"
                                               autocomplete="off"
                                               class="layui-input">
                                    </div>
                                    <div class="layui-input-inline layui-show-xs-block">
                                        <button class="layui-btn" lay-submit lay-filter="sosoNAV" type="submit">
                                            <i class="layui-icon">&#xe615;</i></button>
                                    </div>
                                </form>
                            </td>
                        </tr>
                        <tr>
                            <th style="width: 50px">
                                <input type="checkbox" lay-filter="checkall" name="" lay-skin="primary">
                            </th>
                            <th>功能ID</th>
                            <th>功能名称</th>
                            <th>功能状态</th>
                        </tr>
                        </thead>
                        <tr v-for="(nax,i) in navig_list">
                            <td style="width: 50px">
                                <input type="checkbox" name="id" v-bind:value="nax.uuid" v-if="nax.isDLR==0" checked lay-skin="primary">
                                <input type="checkbox" name="id" v-bind:value="nax.uuid" v-if="nax.isDLR!=0" lay-skin="primary">
                            </td>
                            <td>{{nax.uuid}}</td>
                            <td>{{nax.navig}}</td>
                            <td v-if="nax.status==0">启用</td>
                            <td v-if="nax.status==1">禁用</td>
                        </tr>
                    </table>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>